﻿import QtQuick 2.0
import "../../components"

Item {

    id: root
    property string type: ""

    Image{
        visible: gShiftingMaching !== 2
        height: sfPosi.pPumpSensor.height * parent.height
        width: sfPosi.pPumpSensor.width * parent.width
        x: sfPosi.pPumpSensor.x * parent.width - 0.5*width
        y: sfPosi.pPumpSensor.y * parent.height - 0.5*height
        source: type==="传输中" ? "qrc:/picture/animation/Shifting/pPumpSensor_y.png":"qrc:/picture/animation/Shifting/pPumpSensor_1.png"
        MouseArea{
            anchors.fill: parent
            hoverEnabled: config.hoverEnabled
            onEntered: {
                toolTip_sensor.visible = true
            }onExited: {
                toolTip_sensor.visible = false
            }
        }
        CustomTooltip{
            id: toolTip_sensor
            text: "液位传感器: "
            onVisibleChanged: {
                text = "液位传感器: " + type
            }
        }
        Timer{
            id: timer_refreshSenserInfo
            repeat: true
            running: root.visible
            interval: 500
            onTriggered: {
                if(gPageIdx===3 || gPageIdx===1){
                    type = (CAnimationPractice.getCheckInfo(3))["3"]
                }
            }
        }
    }
}
